#ifndef TRAITEMENT_H
#define TRAITEMENT_H

typedef struct requete_t{
  enum m{pas_methode=-1, get=0, head=1, post=2} methode; 
  char *url;
  char *url_demande;//path demande par le client
  enum p {pas_protocole=-1, http0_9=0 ,http1_0=1, http1_1=2} protocole;
  char *Accept_Encoding; 
  char *Authorization; 
  char *Content_Length;
  char *User_Agent;
} *requete_t;

extern requete_t creer_requete(void);
extern void      liberer_requete(requete_t self);
extern char     *recupere_requete(int fdsock);
extern requete_t traiter_requete(char *requete_recue);
extern int       requete_bonne(requete_t r);
extern int       protocole_09(char *premiere_ligne);
extern void      recuperer_options(char *options,requete_t req);

#endif
